﻿<Window x:Class="Big3.Hitbase.CDUtilities.WindowParticipant"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  Style="{DynamicResource MyWindowStyle}"
        xmlns:sr="clr-namespace:Big3.Hitbase.SharedResources;assembly=Big3.Hitbase.SharedResources"
        Title="Mitwirkende(n) hinzufügen" Height="300" Width="400" MinHeight="300" MinWidth="400" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" TextOptions.TextFormattingMode="Display" Closing="Window_Closing">
    <Window.Resources>
        <ItemsPanelTemplate x:Key="VirtualItemPanel">
            <VirtualizingStackPanel />
        </ItemsPanelTemplate>
        <DataTemplate x:Key="NameDataTemplate">
            <TextBlock Width="300" Text="{Binding}" />
        </DataTemplate>
    </Window.Resources>
    <Window.CommandBindings>
        <CommandBinding Command="sr:HitbaseCommands.EditRoles" Executed="CommandBindingEditRoles_Executed" />
        <CommandBinding Command="sr:HitbaseCommands.EditPersonGroup" Executed="CommandBindingEditPersonGroup_Executed" />
    </Window.CommandBindings>
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <TextBlock Text="Rolle:" Grid.Row="0" VerticalAlignment="Center" />
        <TextBlock Text="Name:" Grid.Row="1" VerticalAlignment="Center" />
        <TextBlock Text="Track:" Grid.Row="2" VerticalAlignment="Center" />
        <TextBlock Text="Kommentar:" Grid.Row="3" Margin="0,5,5,0" />
        <ComboBox Grid.Row="0" Grid.Column="1" Margin="0,5,35,5" Name="ComboBoxRole" SelectionChanged="ComboBoxRole_SelectionChanged" />
        <Button Grid.Row="0" Grid.Column="1" Content="..." HorizontalAlignment="Right" Width="30" Margin="0,5,0,5" Name="ButtonRole" Command="sr:HitbaseCommands.EditRoles" />
        <ComboBox Grid.Row="1" Grid.Column="1" Margin="0,5,35,5" IsEditable="True" Name="ComboBoxName" ItemsPanel="{StaticResource VirtualItemPanel}" ItemTemplate="{StaticResource NameDataTemplate}" />
        <Button Grid.Row="1" Grid.Column="1" Content="..." HorizontalAlignment="Right" Width="30" Margin="0,5,0,5" Name="ButtonName" Command="sr:HitbaseCommands.EditPersonGroup"/>
        <TextBox Grid.Row="2" Grid.Column="1" Margin="0,5,0,5" Width="50" HorizontalAlignment="Left" Name="TextBoxTrack" />
        <TextBox Grid.Row="3" Grid.Column="1" Margin="0,5,0,5" Name="TextBoxComment" />
        <Button Grid.Row="4" Grid.Column="1" Height="23" Content="OK" HorizontalAlignment="Right" Width="80" Margin="0,5,90,0" IsDefault="True" Name="ButtonOK" Click="ButtonOK_Click" />
        <Button Grid.Row="4" Grid.Column="1" Height="23" Content="Abbrechen" HorizontalAlignment="Right" Width="80" Margin="0,5,0,0" IsCancel="True" Name="ButtonCancel" Click="ButtonCancel_Click" />
    </Grid>
</Window>
